
<!--    <script>-->
<!--        checkRole('admin');-->
<!--    </script>-->
<!--管理员用户管理界面-->
    <style>
        .addUserBtn{
            color:#fff;
            background-color:#40BEA6;
            border: 1px solid rgba(0,0,0,0.2);
            border-radius: 5px;
            padding: 5px 10px;
            font-size: 14px;
        }
        .addUserBtn:hover{
            background-color:#009688;
            color:#fff;
            cursor: pointer;
        }

        .secBtn-green{
            width: 60px;
            height: 25px;
            padding: 2px 0px;
            color: #FFFFFF;
            background-color:#40BEA6;
            border:1px solid rgba(0,0,0,0.2) ;
            border-radius: 3px;
        }
        .secBtn-green:hover{
            background-color:#009688;
            cursor: pointer;
        }

        .secBtn-yellow{
            width: 60px;
            height: 25px;
            padding: 2px 0px;
            color: #FFFFFF;
            background-color:rgba(218,165,32,0.8);
            border:1px solid rgba(0,0,0,0.2) ;
            border-radius: 3px;
        }

        .secBtn-yellow:hover{
            background-color:rgba(218,165,32,0.6);
            cursor: pointer;
        }


        .secBtn-blue{
            width: 60px;
            height: 25px;
            padding: 2px 0px;
            color: #FFFFFF;
            background-color:#1EA0FF;
            border:1px solid rgba(0,0,0,0.2) ;
            border-radius: 3px;
        }
        .secBtn-blue:hover{
            background-color:#0A78FF;
            cursor: pointer;
        }

        .resetPwdBtn{
            width: 40px;
            height: 25px;
            padding: 2px 0px;
            color: #FFFFFF;
            background-color:rgba(255,0,0,0.7);
            border:1px solid rgba(0,0,0,0.2) ;
            border-radius: 3px;
        }
        .resetPwdBtn:hover{
            background-color:rgba(255,0,0,0.5);
            cursor: pointer;
        }

        .lockBtn{
            width: 50px;
            height: 25px;
            padding: 2px 0px;
            color: #FFFFFF;
            background-color:rgba(0,0,255,0.6);
            border:1px solid rgba(0,0,0,0.2) ;
            border-radius: 3px;
        }
        .lockBtn:hover{
            background-color:rgba(0,0,255,0.4);
            cursor: pointer;
        }


        .updateUser{
            margin-right: 5px;
        }

        .secSelect{
            background-color: #FFFFFF;
            width: 75px;
            border-radius: 5px;
            /*margin-top: 2px;*/
            border: 1px solid rgba(0,0,0,0.1);
            height: 35px;
        }

        #secReset{
            background-color: rgba(255,165,0,1);
        }

        .textContent{
            text-align: center;
            line-height: 40px;
        }
        .unBtn{
            width: 40px;
            height: 25px;
            padding: 2px 0px;
            color: #FFFFFF;
            background-color:rgba(119,136,153,1);
            border:1px solid rgba(0,0,0,0.2) ;
            border-radius: 3px;
        }
        .unBtn:hover{
            cursor: pointer;
        }



    </style>
    <div class="padding-big">
        <div class="op" style="margin-top: 20px;">
            <div class="layui-inline">
                <a class="addUserBtn" id="addUser" onclick="checkandAddSecUser()">
                    <!--                <i class="fa fa-plus fa-lg fa-gray fa-fw"></i>-->
                    新增用户
                </a>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">角色:</label>
                <div class="layui-input-inline">
                    <select id="role" class="secSelect" style="width: 90px">
                        <option value='' ></option>
                        <option value='operator' >业务操作员</option>
                        <option value='auditor'>业务审计员</option>
                        <option value='sysAuditor'>系统审计员</option>
                        <option value='admin'>系统管理员</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">账号类型:</label>
                <div class="layui-input-inline">
                    <select id="type" class="secSelect">
                        <option value=""></option>
                        <option value="0">临时账户</option>
                        <option value="1">永久账户</option>
                    </select>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">账号状态:</label>
                <div class="layui-input-inline">
                    <select id="state" class="secSelect">
                        <option value=""></option>
                        <option value="0">注销</option>
                        <option value="1">休眠</option>
                        <option value="2">激活</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">账号锁定:</label>
                <div class="layui-input-inline">
                    <select id="lock" class="secSelect">
                        <option value=""></option>
                        <option value="0">未锁定</option>
                        <option value="1">已锁定</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">授权状态:</label>
                <div class="layui-input-inline">
                    <select id="permission" class="secSelect">
                        <option value=""></option>
                        <option value="0">请求授权</option>
                        <option value="1">未授权</option>
                        <option value="2">已授权</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                    <label class="layui-form-label">用户名:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="username" id="username" maxlength="16" lay-verify="title" autocomplete="off"
                               placeholder="请输入用户名" class="layui-input">
                    </div>
            </div>
                <button class="layui-btn layui-btn-normal" id="secSearch"><i class="fa fa-search"></i>&nbsp;搜索</button>
                <button class="layui-btn layui-btn-normal" id="secReset"><i class="fa fa-reply"></i>&nbsp;重置</button>

             <p style="font-size: 14px;display: inline-block;background-color: #FFFFFF;
             border: 2px solid rgba(0,0,0,0.75);border-radius: 10px;padding: 5px 10px;float: right">
                 在线用户共: <span  style="color: rgba(5,50,255,0.9);"> <strong id="onlineNums" style="font-size: 20px">1</strong></span> 位
             </p>

       </div>
    </div>

    <div class="offcial-table margin-top clearfix" style="background-color: #fff;">
        <div class="offcial-table tr-border margin-big-top clearfix">
            <div class="tr-th clearfix">
                <div class="th w10">
                    用户名
                </div>
                <div  class="th w10">
                    在线状态
                </div>
                <div  class="th w10">
                    角色
                </div>
                <div  class="th w10">
                    账号类型
                </div>
                <div  class="th w10">
                    账号状态
                </div>
                <div  class="th w10">
                    账号锁定
                </div>
                <div  class="th w10">
                    用户授权
                </div>
                <div  class="th w10">
                    重置密码
                </div>
                <div class="th w10">
                    休眠时间
                </div>
                <div class="th w10">
                    操作
                </div>
            </div>
            <div id="tbody">


            </div>
        </div>
    </div>

        <div class="show-page padding-big-right">
            <div class="page">
                <div class="page">
                    <p style="font-size: 14px;margin-left: 20px">
                        符合条件的用户共:&nbsp;<span id="numValue" style="color: red;">0 </span>&nbsp;位;
<!--                        <br/>-->
                    </p>
                    <ul class="offcial-page margin-top margin-big-right">
                        <li>
                            <a href="javascript:void(0)" onclick="listFirstSecUsers()" class="next">首     页</a>
                        </li>
                        <li>
                            <a href="javascript:void(0)" onclick="lastSecUser()" class="next">上一页</a>
                        </li>
                        <li><span class="fl">第<em class="margin-small-left margin-small-right" id="pageNum">1</em>页</span>
                        </li>
                        <li>
                            <a href="javascript:void(0)" onclick="nextSecUser()" class="next">下一页</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

    </div>

    <script type="text/javascript" src="js/adminSecUserManagement.js"></script>
    <script>
            // checkRole("admin");
            listSecUsers(1);

            //延迟任务查询当前是否有休眠用户快到期
            // setTimeout(function(){
            //     $.ajax({
            //         url:HOST.concat("/getsleepuseroveryear?token="+config.token+"&timeStamp="+new Date().getTime()),
            //         type:"get",
            //         dataType:"json",
            //         success:function(data){
            //                 //console.log(data);
            //                 if (data.meta.state=="success"){
            //                     var count = data.data.count;
            //                     if (count>0){
            //                         alert("温馨提示:存在休眠账号一周内到期，详情请查询休眠用户");
            //                     }
            //                 } else{
            //                     console.log("查询失败");
            //                 }
            //         },
            //         error:function (data) {
            //             console.log("服务器异常");
            //         }
            //     });
            // },3000);


    </script>





